/*
 * @Author jiangzhiwei
 * @Date 2023-07-19 11:43:33
 * @LastEditors jiangzhiwei
 * @LastEditTime 2023-07-28 11:28:38
 * @FilePath \test-cron\src\components\yc-cron\components\base\common-tab-pane\index.js
 * @Description 标签面板
 */
import { defineComponent } from 'vue-demi'
import { h } from '../../../utils/domutil'
import { getSlot } from '../../../utils/componentutil'
import { VALUE_NAME } from '../../../utils/constant'
import './tabpane.css'

export default defineComponent({
  props: {
    label: {
      type: String,
      default: undefined
    }
  },
  data () {
    return {}
  },
  render () {
    return h(
      'div',
      {
        class: {
          'yc-cron-tab-pane': true,
          'is-active': this.label === this.$parent[VALUE_NAME]
        }
      },
      getSlot(this)
    )
  }
})